//
//  SearchTitleView.h
//  富学宝典3
//
//  Created by xiaohui on 2016/11/4.
//  Copyright © 2016年 xiaohui. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "WBSearchBar.h"

typedef enum searchTitleViewButtonType{
    SearchTitleViewButtonBack,
    SearchTitleViewButtonSearch
}SearchTitleViewButtonType;

@class SearchTitleView;
@protocol SearchTitleViewDelegate <NSObject>
@optional
-(void)searchTileViewTextFieldDidChange:(NSString*)textFieldString;
-(void)searchTileViewSearchButtonClickSearchString:(NSString*)searchString;

@end

@interface SearchTitleView : UIView
+ (instancetype)titleView;
/**  代理*/
@property (nonatomic,weak) id<SearchTitleViewDelegate>  delegate;
/**  搜索内容*/
@property (nonatomic,copy) NSString   *searchText;

/**  搜索框*/
@property (nonatomic,weak) WBSearchBar  *searchBar;

/**      取消搜索框的键盘响应   */
- (void)resignSearchBarResponder;
@property(nonatomic) UIReturnKeyType returnKeyType;

-(void)dismiss;

- (void)setTitlePlaceholder:(NSString *)str;

@end




           
                  

